package cn.hy.today;

class Solution_2697 {
    public String makeSmallestPalindrome(String s) {
        char[] charArray = s.toCharArray();
        int i = 0, j = charArray.length - 1;
        while (i < j) {
            char a = charArray[i];
            char b = charArray[j];
            charArray[i] = charArray[j] = (char) Math.min(a, b);
            i += 1;
            j -= 1;
        }
        return new String(charArray);
    }
}